<template>
  <el-tabs v-model="activeName" type="card" class="bColorT">
    <el-tab-pane v-for="tab in tabs" :key="tab.name" :label="tab.label" :name="tab.name">
      <component :is="tab.name" />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import { Users } from './list';
import { Detail } from './userDetail';

export default {
  name: 'Index',
  components: {
    Users,
    Detail
  },
  data () {
    return {
      activeName: '',
      tabs: [
        {
          label: '用户管理',
          name: 'Users'
        }
        // {
        //   label: '用户详情',
        //   name: 'Detail'
        // }
      ]
    };
  },
  created () {
    this.activeName = this.tabs[0].name;
  }
};
</script>

<style lang="scss" scoped></style>
